import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/purchase/purchase-adjust/list`,
      method: 'post',
      data
    })
  },
  // 审核
  audit(data) {
    return request({
      url: `/v1/finance/refund/audit`,
      method: 'post',
      data
    })
  },
  // 采购确认
  purchaseConfirm(data) {
    return request({
      url: `/v1/purchase/purchase-adjust/purchase-confirm`,
      method: 'post',
      data
    })
  },
  // 财务确认
  financeConfirm(data) {
    return request({
      url: `/v1/purchase/purchase-adjust/finance-confirm`,
      method: 'post',
      data
    })
  },
  // 提交
  submit(params) {
    return request({
      url: `/v1/purchase/purchase-adjust/submit`,
      method: 'get',
      params
    })
  },
  // 明细
  detail(params) {
    return request({
      url: `/v1/purchase/purchase-adjust/detail`,
      method: 'get',
      params
    })
  },
  // 编辑
  edit(data) {
    return request({
      url: `/v1/purchase/purchase-adjust/edit`,
      method: 'post',
      data
    })
  },
  // 批量作废
  cancel(data) {
    return request({
      url: `/v1/purchase/purchase-adjust/batch-cancel`,
      method: 'post',
      data
    })
  },
}
